<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.changil.admin.dto.Article" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html>
<head>
<title>노원창일교회 ADMIN - 글목록</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link href="/NowonChangilChurch_Admin/assets/css/board.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div id="container">
		<%@ include file="/views/common/header.jsp"%>
		<div id="content">
			<div id="board">
				<table>
					<tr>
						<td colspan=5 align=right>
						<form action="/NowonChangilChurch_Admin/board" method="post">
							<input type="hidden" name="a" value="writeform">
							<input type="hidden" name="boardId" value="<%=request.getParameter("boardId")%>">
							<c:choose>
							<c:when test="${authUser != null }">
								<input type="submit" VALUE="글쓰기" class=button>
							</c:when>
							</c:choose>
						</form>
						</td>
					</tr>
					<tr>
						<th>
							번호
						</th>
						<th>
							제목
						</th>
						<th>
							작성자								
						</th>
						<th>
							작성시간
						</th>
					</tr>
					<c:forEach var="article" items="${list}" varStatus="status">
					 <tr>
						<td>
							${status.count}
						</td>
						<td class="title">
						<a href="/NowonChangilChurch_Admin/board?a=view&boardId=<%=request.getParameter("boardId")%>&articleId=${article.id}">
							${article.title}
						</a>
						</td>
						<td>
								${article.writer.name}								
						</td>
						<td>
								${article.writtenDateTime}
						</td>
					</tr> 
					</c:forEach>
				</table>
			</div>
		</div>
		<%@ include file="/views/common/navigation.jsp"%>
		<%@ include file="/views/common/footer.jsp"%>
	</div>
</body>
</html>